package com.deer.wms.system.manage.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.deer.wms.project.root.core.result.Result;
import com.deer.wms.project.root.core.service.QueryCriteria;
import com.deer.wms.system.manage.model.CellLed;
import com.deer.wms.system.manage.test.AllLedControlDto;
import com.deer.wms.system.manage.test.HeartbeatDto;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author luowe
* @description 针对表【cell_led(用户仓库表)】的数据库操作Service
* @createDate 2022-07-11 15:19:31
*/
public interface CellLedService extends IService<CellLed> {

    public List<CellLed> findCellLed(List<String> cellCodes);

    void update(CellLed cellLed);

    void add(CellLed cellLed);

    List<CellLed> findList(QueryCriteria queryCriteria);

    void delete(String ids);

    /**
     *
     * @param cellCodes
     * @param color 颜色1-7 (红绿蓝黄青紫白)
     * @param time 控制时长 -1 不限时  单位（s）
     * @param lighttype 亮---1    灭 ---0
     * @return
     */
    Result ledControl(List<String> cellCodes, String color, Long time, Integer lighttype);

    void heartbeat(HttpServletRequest request, HeartbeatDto heartbeatDto);

    Result setServerIp(String ip);

    Result ledcheck(String ip);

    Result setmidnum(String ip, Integer num);

    Result settotalnum(String ip, Integer num);

    Result allledcontrol(AllLedControlDto allLedControlDto, String ip);
}
